<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>主页</title>
    <link type="text/css" href="../static/style/core.css" />
    <script type="text/javascript" src="../static/js/jquery-1.11.3.js"></script>

    <script type="text/javascript">
        $(function(){
            /*$("#testId").on("click", function(){
                alert("i am clicked");
            });*/

            //查找第一个div
            $("div").eq(0).on("click", function () {
                alert("i am clicked");
            });
        });
    </script>
</head>
<body>
    <p>欢迎访问</p>

    <div id="testId">
        <b>click</b>
    </div>
</body>
</html>